package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallGoodsExtend;
import com.appkubes.mall.core.po.MallGoodsExtendExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallGoodsExtendMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsExtendSqlProvider.class, method="countByExample")
    long countByExample(MallGoodsExtendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallGoodsExtendSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallGoodsExtendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_goods_extend",
        "where goods_key = #{goodsKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String goodsKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_goods_extend (goods_key, app_key, ",
        "create_time, update_time, ",
        "`name`, cat_key, sort, ",
        "price, `state`, is_hot, ",
        "subheading, sku_template_json, ",
        "sku_template_key, color_attributes, ",
        "version)",
        "values (#{goodsKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, ",
        "#{name,jdbcType=VARCHAR}, #{catKey,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, ",
        "#{price,jdbcType=DECIMAL}, #{state,jdbcType=INTEGER}, #{isHot,jdbcType=INTEGER}, ",
        "#{subheading,jdbcType=VARCHAR}, #{skuTemplateJson,jdbcType=VARCHAR}, ",
        "#{skuTemplateKey,jdbcType=VARCHAR}, #{colorAttributes,jdbcType=VARCHAR}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallGoodsExtend record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallGoodsExtendSqlProvider.class, method="insertSelective")
    int insertSelective(MallGoodsExtend record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsExtendSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="cat_key", property="catKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
        @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="is_hot", property="isHot", jdbcType=JdbcType.INTEGER),
        @Result(column="subheading", property="subheading", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_template_json", property="skuTemplateJson", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_template_key", property="skuTemplateKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="color_attributes", property="colorAttributes", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallGoodsExtend> selectByExampleWithRowbounds(MallGoodsExtendExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsExtendSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="cat_key", property="catKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
        @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="is_hot", property="isHot", jdbcType=JdbcType.INTEGER),
        @Result(column="subheading", property="subheading", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_template_json", property="skuTemplateJson", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_template_key", property="skuTemplateKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="color_attributes", property="colorAttributes", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallGoodsExtend> selectByExample(MallGoodsExtendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "goods_key, app_key, create_time, update_time, `name`, cat_key, sort, price, ",
        "`state`, is_hot, subheading, sku_template_json, sku_template_key, color_attributes, ",
        "version",
        "from mall_goods_extend",
        "where goods_key = #{goodsKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="goods_key", property="goodsKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="cat_key", property="catKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="sort", property="sort", jdbcType=JdbcType.INTEGER),
        @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
        @Result(column="state", property="state", jdbcType=JdbcType.INTEGER),
        @Result(column="is_hot", property="isHot", jdbcType=JdbcType.INTEGER),
        @Result(column="subheading", property="subheading", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_template_json", property="skuTemplateJson", jdbcType=JdbcType.VARCHAR),
        @Result(column="sku_template_key", property="skuTemplateKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="color_attributes", property="colorAttributes", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallGoodsExtend selectByPrimaryKey(String goodsKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsExtendSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallGoodsExtend record, @Param("example") MallGoodsExtendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsExtendSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallGoodsExtend record, @Param("example") MallGoodsExtendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsExtendSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallGoodsExtend record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_extend
     *
     * @mbg.generated
     */
    @Update({
        "update mall_goods_extend",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "`name` = #{name,jdbcType=VARCHAR},",
          "cat_key = #{catKey,jdbcType=VARCHAR},",
          "sort = #{sort,jdbcType=INTEGER},",
          "price = #{price,jdbcType=DECIMAL},",
          "`state` = #{state,jdbcType=INTEGER},",
          "is_hot = #{isHot,jdbcType=INTEGER},",
          "subheading = #{subheading,jdbcType=VARCHAR},",
          "sku_template_json = #{skuTemplateJson,jdbcType=VARCHAR},",
          "sku_template_key = #{skuTemplateKey,jdbcType=VARCHAR},",
          "color_attributes = #{colorAttributes,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER}",
        "where goods_key = #{goodsKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallGoodsExtend record);
}